package com.system.enroll.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.system.enroll.dao.StudentDao;
import com.system.enroll.model.Student;
import com.system.enroll.service.StudentService;

@Service("studentService")
public class StudentServiceImpl implements StudentService {

	@Autowired
	StudentDao studentDao;
	
	public void setStudentDao(StudentDao studentDao) {
		this.studentDao = studentDao;
	}

	@Override
	public void save(Student student) {
		studentDao.save(student);		
	}

	@Override
	public void update(Student student) {
		studentDao.update(student);
		
	}

	@Override
	public void delete(Student student) {
		studentDao.delete(student);
		
	}

	@Override
	public Student findByStudentById(Integer id) {
		return studentDao.findByStudentById(id);
	}



	@Override
	public List<Student> findAllStudent() {
		return studentDao.findAllStudent();
	}

}
